package com.luisfernandojr.calc;

import java.util.ArrayList;

import android.app.Activity;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.ListView;

public class Hist extends Activity {

	private ArrayList<String> s_history = new ArrayList<String>();
	
	public void setS_history(ArrayList<String> s_history) {
		this.s_history = s_history;
	}
	
	public ArrayList<String> getS_history() {
		return s_history;
	}
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		
		// receiving parameter from previous activity
		Bundle b = getIntent().getExtras();
		setS_history(b.getStringArrayList("history"));
		
		ListView lv = new ListView(this);
		ArrayAdapter<String> adap = new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1,getS_history());
		lv.setAdapter(adap);
		setContentView(lv);
		
	}

}
